{% extends 'base.html' %}
{% load crispy_forms_tags %}
{% block title %}
    修改学生资料
{% endblock %}
{% block header_name %}
    学生管理
{% endblock %}
{% block body %}
      <!-- Breadcrumb-->
    <div class="breadcrumb-holder container-fluid">
    <ul class="breadcrumb">
      <li class="breadcrumb-item"><a href="{% url 'index' %}">首页</a></li>
      <li class="breadcrumb-item"><a href="{% url 'students:students' %}">学生管理</a></li>
      <li class="breadcrumb-item active">修改学生资料</li>
    </ul>
    </div>

  <br>

  <div class="container">
    <div class="row">
      <div class="col-md-8 offset-md-2">
        <form id="student_form" action="{% url 'students:student_update' student.pk %}" method="post">
          {% csrf_token %}
          {{ form.media }}
          {{ form|crispy }}
        </form>
        <div class="form-group">
          <button type="submit" class="btn btn-primary button-submit">确认更改</button>

        </div>
      </div>
    </div>
  </div>




{% endblock %}
{% block js %}
  <script>
    $(function () {
        $('.button-submit').click(function () {
            $('#student_form').submit()
            alert("更新学生资料成功！")
        })
    })
  </script>
{% endblock %}
